//
//  SIXMeTableController.m
//  weibo
//
//  Created by chenangel on 16/5/21.
//  Copyright © 2016年 chuhan. All rights reserved.
//

#import "SIXMeTableController.h"

@interface SIXMeTableController ()

@end

@implementation SIXMeTableController

- (void)viewDidLoad {
    [super viewDidLoad];

    self.tableView.frame = [UIApplication sharedApplication].keyWindow.frame;
    [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"cell"];
    self.tableView.dataSource = self;
}


#pragma mark - Table view data source

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 30;
}

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    static NSString *ID = @"cell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];

    //NSLog(@"----cell");
    
    cell.textLabel.text = [NSString stringWithFormat:@"index--%zd",indexPath.row];
    return cell;
}


#pragma mark---代理方法
-(void)scrollViewDidScroll:(UIScrollView *)scrollView{
    CGFloat offSetY = scrollView.contentOffset.y;
    if ([self.delegate performSelector:@selector(SIXMeTableControllerOffsetY:) withObject:nil]) {
        
        [self.delegate SIXMeTableControllerOffsetY:offSetY];
    }
    
}
/*
// Override to support rearranging the table view.
- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
}
*/

/*
// Override to support conditional rearranging of the table view.
- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
    // Return NO if you do not want the item to be re-orderable.
    return YES;
}
*/

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
